import { post } from "./ajax";
interface AnswerItem {
  componentId: string;
  value: string | string[]; // 根据表单数据，可能是单个值或数组
}

interface AnswerInfo {
  questionId: string;
  answerList: AnswerItem[];
}

export async function postAnswer(answerInfo: AnswerInfo) {
  const url = "/api/answer";
  const res = await post(url, answerInfo);
  return res;
}
